// import './starSky.scss'
export default function initPaticleBg() {
    const windowWidth = document.documentElement.clientWidth || document.body.clientWidth;
    const windowHeight = document.documentElement.clientHeight || document.body.clientHeight;
    const canvas = document.getElementById('canvas') as HTMLCanvasElement;

    const ctx = canvas.getContext('2d') as CanvasRenderingContext2D;
    canvas.width = windowWidth
    canvas.height = windowHeight

    const w = window.innerWidth * devicePixelRatio
    const h = window.innerHeight * devicePixelRatio

    const startDraw = () => {
        ctx!.fillStyle = 'rgba(0, 0, 0, 0)'
        ctx.fillRect(0, 0, w, h)
    }
    const animation = () => {
        startDraw()
        requestAnimationFrame(animation)
    }

    animation()
}